<script setup>
	let arrs = [...Array(9999999).keys()]
	// console.log("数组" + arrs);
	let total = 0;
	// 开始时间
	let startTime = Date.now();

	arrs.forEach(item => {
		if (item == 10) return;
		total += item;
	})

	// for(let i=0; i<arrs.length; i++){
	// 	if(i==10) break;
	// 	total+=i;
	// }

	// 结束时间
	let endTime = Date.now();
	let countTime = endTime - startTime;
	console.log("计数---->" + total);
	console.log("消耗时间---->" + countTime);
</script>
<template>
	<view class="">

	</view>
</template>
<style lang="scss" scoped>

</style>